<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page isELIgnored="false" %>
<html>

<head>
    <title>重置密码</title>
    <meta charset="utf-8" />
    <link type="text/css" rel="stylesheet" href="/css/bootstrap.css">
    <link type="text/css" rel="stylesheet" href="/css/admin/materialdesignicons.min.css">
    <link type="text/css" rel="stylesheet" href="/css/admin/style.min.css">

    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/admin/main.min.js"></script>
    <script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/aes.js"></script>
    <script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/core-min.js"></script>
    <script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/cipher-core-min.js"></script>
    <script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/mode-ecb-min.js"></script>
    <script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/pad-zeropadding-min.js"></script>
    <script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/validate.form.js"></script>

</head>

<body>
<div class="container-fluid p-t-15">

    <c:if test="${!empty msg}">
        <div id="msgAlert" class="alert alert-success"> ${msg}</div>
    </c:if>
    <c:if test="${!empty failMsg}">
        <div id="failAlert" class="alert alert-danger">${failMsg}</div>
    </c:if>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <form class="site-form" action="/bookmall/admin/reset" method="post" onsubmit="return validatePassword()">

                        <input type="hidden" name="id" value="${usered.id}" />

                        <div class="form-group">
                            <label for="oldpassword">旧密码</label>
                            <input type="password" id="oldpassword" class="form-control" name="oldpassword"
                                   placeholder="输入账号的原登录密码">
                        </div>

                        <div class="form-group">
                            <label for="newpassword">新密码</label>
                            <input type="password" id="newpassword" class="form-control" name="newpassword"
                                   placeholder="输入新的密码">
                        </div>
                        <button type="submit" class="btn btn-primary">修改密码</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

</html>
